package com.example.boot.modules.auth.vo;

import lombok.Data;

import java.util.List;

/**
 * @author 王令
 * @since 2022/10/20 21:02
 */
@Data
public class Pagination<T> {

    private List<T> records;

    private int current;

    private int size;

    private int total;

    private int pages;

    public int getPages() {
        if (total % size == 0) {
            return total / size;
        }
        return total / size + 1;
    }
}
